<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../style.css" type="text/css" media="screen">
<link rel="stylesheet" href="../../../print.css" type="text/css" media="print">
<meta content="Foam,org.generalrelativity.foam.Foam,DEFAULT_ODE_SOLVER,STEP,timestep,engine,defaultSolver,solverIterations,simulatables,addElement,addGlobalForceGenerator,removeGlobalForceGenerator,removeElement,stopDrawing,stopSimulating,stopColliding,simulate,stop,stepForward,stepBackward,setCoarseCollisionDetector,setCollisionFactory,setRenderer,addRenderable,useMouseDragger" name="keywords">
<title>org.generalrelativity.foam.Foam</title>
</head>
<body>
<script type="text/javascript" language="javascript" src="../../../asdoc.js"></script><script type="text/javascript" language="javascript" src="../../../cookies.js"></script><script type="text/javascript" language="javascript">
<!--
				asdocTitle = 'Foam - API Documentation';
				var baseRef = '../../../';
				window.onload = configPage;
			--></script>
<table style="display:none" id="titleTable" cellspacing="0" cellpadding="0" class="titleTable">
<tr>
<td align="left" class="titleTableTitle">API Documentation</td><td align="right" class="titleTableTopNav"><a onclick="loadClassListFrame('../../../all-classes.html')" href="../../../package-summary.html">All&nbsp;Packages</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../all-classes.html')" href="../../../class-summary.html">All&nbsp;Classes</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../index-list.html')" href="../../../all-index-A.html">Index</a>&nbsp;|&nbsp;<a href="../../../index.html?org/generalrelativity/foam/Foam.html&amp;org/generalrelativity/foam/class-list.html" id="framesLink1">Frames</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">No&nbsp;Frames</a></td><td rowspan="3" align="right" class="titleTableLogo"><img alt="Adobe Logo" title="Adobe Logo" class="logoImage" src="../../../images/logo.jpg"></td>
</tr>
<tr class="titleTableRow2">
<td align="left" id="subTitle" class="titleTableSubTitle">Class&nbsp;Foam</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#propertySummary">Properties</a>&nbsp;| <a href="#methodSummary">Methods</a>&nbsp;| <a href="#eventSummary">Events</a>&nbsp;| <a href="#constantSummary">Constants</a></td>
</tr>
<tr class="titleTableRow3">
<td colspan="2">&nbsp;</td>
</tr>
</table>
<script type="text/javascript" language="javascript">
<!--
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Class Foam"); titleBar_setSubNav(true,true,false,false,true,false,true,false,false,false,false,false,false,false);}
--></script>
<div class="MainContent">
<table cellspacing="0" cellpadding="0" class="classHeaderTable">
<tr>
<td class="classHeaderTableLabel">Package</td><td><a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">org.generalrelativity.foam</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Class</td><td class="classSignature">public class Foam</td>
</tr>
<tr>
<td class="classHeaderTableLabel">Inheritance</td><td class="inheritanceList">Foam <img class="inheritArrow" alt="Inheritance" title="Inheritance" src="../../../images/inherit-arrow.gif"> flash.display.Sprite</td>
</tr>
</table>
<p></p>
<p></p>
<br>
<hr>
</div>
<a name="propertySummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Properties</div>
<table id="summaryTableProperty" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#defaultSolver">defaultSolver</a> : Class<div class="summaryTableDescription">[write-only]</div>
</td><td class="summaryTableOwnerCol">Foam</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#engine">engine</a> : <a href="dynamics/PhysicsEngine.html">PhysicsEngine</a>
<div class="summaryTableDescription">[read-only]</div>
</td><td class="summaryTableOwnerCol">Foam</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#simulatables">simulatables</a> : Array<div class="summaryTableDescription">[read-only]</div>
</td><td class="summaryTableOwnerCol">Foam</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#solverIterations">solverIterations</a> : int<div class="summaryTableDescription">[write-only]</div>
</td><td class="summaryTableOwnerCol">Foam</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#timestep">timestep</a> : Number<div class="summaryTableDescription"></div>
</td><td class="summaryTableOwnerCol">Foam</td>
</tr>
</table>
</div>
<a name="methodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Methods</div>
<table id="summaryTableMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#Foam()">Foam</a>()</div>
<div class="summaryTableDescription">
   Creates a new FOAM interface
   
   This is most likely the first step in creating a physics simulation.</div>
</td><td class="summaryTableOwnerCol">Foam</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#addElement()">addElement</a>(element:<a href="dynamics/element/ISimulatable.html">ISimulatable</a>, collide:Boolean = true, render:Boolean = true, renderData:* = null, solver:<a href="dynamics/ode/IODESolver.html">IODESolver</a> = null):void</div>
<div class="summaryTableDescription">
   Adds an element to the simulation
   
   <p>
   This will probably be the most used method- it handles a lot of the logic
   necessary to give the user a lot of control without worrying about dividing
   up the element to its respective places in the application.</div>
</td><td class="summaryTableOwnerCol">Foam</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#addGlobalForceGenerator()">addGlobalForceGenerator</a>(forceGenerator:<a href="dynamics/force/IForceGenerator.html">IForceGenerator</a>, applyToExisting:Boolean = true):void</div>
<div class="summaryTableDescription">
   Adds a global force to the simulation
   
   <p>
   This force will be added to all future and current (as defined 
   by applyToExisting) elements
   </p>
   
   </div>
</td><td class="summaryTableOwnerCol">Foam</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#addRenderable()">addRenderable</a>(renderable:<a href="view/Renderable.html">Renderable</a>):void</div>
<div class="summaryTableDescription">
   Adds a renderable element to the renderer
   
   </div>
</td><td class="summaryTableOwnerCol">Foam</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#removeElement()">removeElement</a>(element:<a href="dynamics/element/ISimulatable.html">ISimulatable</a>):void</div>
<div class="summaryTableDescription">
   Removes an element from the simulation
   
   <p>
   This removes the element from the renderer and the engine.</div>
</td><td class="summaryTableOwnerCol">Foam</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#removeGlobalForceGenerator()">removeGlobalForceGenerator</a>(forceGenerator:<a href="dynamics/force/IForceGenerator.html">IForceGenerator</a>, remainInEffect:Boolean = false):void</div>
<div class="summaryTableDescription">
   Removes a global force from the simulation
   
   <p>
   This force will be removed from all elements its currently generating
   for depending on remainInEffect
   </p>
   
   </div>
</td><td class="summaryTableOwnerCol">Foam</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#setCoarseCollisionDetector()">setCoarseCollisionDetector</a>(detector:<a href="dynamics/collision/ICoarseCollisionDetector.html">ICoarseCollisionDetector</a>):void</div>
<div class="summaryTableDescription">
   Sets the engine's coarse collision detector
   
   </div>
</td><td class="summaryTableOwnerCol">Foam</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#setCollisionFactory()">setCollisionFactory</a>(factory:<a href="dynamics/collision/ICollisionFactory.html">ICollisionFactory</a>):void</div>
<div class="summaryTableDescription">
   Defines the collision factory used by the coarse detector to return IFineCollisionDetectors
   
   </div>
</td><td class="summaryTableOwnerCol">Foam</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#setRenderer()">setRenderer</a>(renderer:<a href="view/IFoamRenderer.html">IFoamRenderer</a>):void</div>
<div class="summaryTableDescription">
   Sets the renderer
   
   </div>
</td><td class="summaryTableOwnerCol">Foam</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#simulate()">simulate</a>():void</div>
<div class="summaryTableDescription">
   Starts running the simulation
   
   </div>
</td><td class="summaryTableOwnerCol">Foam</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#stepBackward()">stepBackward</a>(event:Event = null):void</div>
<div class="summaryTableDescription"></div>
</td><td class="summaryTableOwnerCol">Foam</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#stepForward()">stepForward</a>(event:Event = null):void</div>
<div class="summaryTableDescription"></div>
</td><td class="summaryTableOwnerCol">Foam</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#stop()">stop</a>():void</div>
<div class="summaryTableDescription">
   Stops the simulation
   
   </div>
</td><td class="summaryTableOwnerCol">Foam</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#stopColliding()">stopColliding</a>(element:<a href="dynamics/element/ISimulatable.html">ISimulatable</a>):void</div>
<div class="summaryTableDescription">
   Removes an element from collision consideration
   
   </div>
</td><td class="summaryTableOwnerCol">Foam</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#stopDrawing()">stopDrawing</a>(element:*):void</div>
<div class="summaryTableDescription">
   Stops an element from being rendered.</div>
</td><td class="summaryTableOwnerCol">Foam</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#stopSimulating()">stopSimulating</a>(element:<a href="dynamics/element/ISimulatable.html">ISimulatable</a>):void</div>
<div class="summaryTableDescription">
   Stops an element from being simulated
   
   <p>
   Note that this does not stop an element from being rendered.</div>
</td><td class="summaryTableOwnerCol">Foam</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#useMouseDragger()">useMouseDragger</a>(value:Boolean):void</div>
<div class="summaryTableDescription">
   Depicts whether to use the MouseSpring on bodies or not
   
   </div>
</td><td class="summaryTableOwnerCol">Foam</td>
</tr>
</table>
</div>
<a name="eventSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Events</div>
<table id="summaryTableEvent" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Event</th><th>Summary</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#event:step">step</a>
</div>
</td><td class="summaryTableDescription summaryTableCol">&nbsp;</td><td class="summaryTableOwnerCol">Foam</td>
</tr>
</table>
</div>
<a name="constantSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Constants</div>
<table id="summaryTableConstant" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Constant</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#DEFAULT_ODE_SOLVER">DEFAULT_ODE_SOLVER</a> : Class<div class="summaryTableDescription">[static] offers a default solver class for differential equations </div>
</td><td class="summaryTableOwnerCol">Foam</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#STEP">STEP</a> : String = "step"<div class="summaryTableDescription">[static] step event </div>
</td><td class="summaryTableOwnerCol">Foam</td>
</tr>
</table>
</div>
<script type="text/javascript" language="javascript">
<!--
showHideInherited();
--></script>
<div class="MainContent">
<a name="propertyDetail"></a>
<div class="detailSectionHeader">Property detail</div>
<a name="defaultSolver"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">defaultSolver</td><td class="detailHeaderType">property</td>
</tr>
</table>
<div class="detailBody">
<code>defaultSolver:Class</code>&nbsp;&nbsp;[write-only]<span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function set defaultSolver(value:Class):void</code>
<br>
</div>
<a name="engine"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">engine</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>engine:<a href="dynamics/PhysicsEngine.html">PhysicsEngine</a></code>&nbsp;&nbsp;[read-only]<span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get engine():<a href="dynamics/PhysicsEngine.html">PhysicsEngine</a></code>
<br>
</div>
<a name="simulatables"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">simulatables</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>simulatables:Array</code>&nbsp;&nbsp;[read-only]<span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get simulatables():Array</code>
<br>
</div>
<a name="solverIterations"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">solverIterations</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>solverIterations:int</code>&nbsp;&nbsp;[write-only]<span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function set solverIterations(value:int):void</code>
<br>
</div>
<a name="timestep"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">timestep</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>timestep:Number</code>&nbsp;&nbsp;[read-write]<span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get timestep():Number</code>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function set timestep(value:Number):void</code>
<br>
</div>
<a name="constructorDetail"></a>
<div class="detailSectionHeader">Constructor detail</div>
<a name="Foam()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">Foam</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">constructor</td>
</tr>
</table>
<div class="detailBody">
<code>public function Foam()</code><p>
   Creates a new FOAM interface
   
   This is most likely the first step in creating a physics simulation.
   </p></div>
<a name="methodDetail"></a>
<div class="detailSectionHeader">Method detail</div>
<a name="addElement()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">addElement</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td>
</tr>
</table>
<div class="detailBody">
<code>public function addElement(element:<a href="dynamics/element/ISimulatable.html">ISimulatable</a>, collide:Boolean = true, render:Boolean = true, renderData:* = null, solver:<a href="dynamics/ode/IODESolver.html">IODESolver</a> = null):void</code><p>
   Adds an element to the simulation
   
   </p><p>
   This will probably be the most used method- it handles a lot of the logic
   necessary to give the user a lot of control without worrying about dividing
   up the element to its respective places in the application.
   </p>
   
   <pre>
   //creates a new instance of Foam
   var foam:Foam = new Foam();
   //creates a triangle at x:100, y:100 with a mass of 100 (ShapeUtil.createSymmetricPolygon defaults to 3 vertices)
   var body:RigidBody = new RigidBody( 100, 100, 100, ShapeUtil.createSymmetricPolygon() );
   //adds the body to FOAM for simulation
   foam.addElement( body );
   </pre>
   
   <span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">element</span>:<a href="dynamics/element/ISimulatable.html">ISimulatable</a></code> &mdash; ISimulatable to add
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">collide</span>:Boolean</code> (default = <code>true</code>)<code></code> &mdash; defines whether this element should be tested for collision during simulation
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">render</span>:Boolean</code> (default = <code>true</code>)<code></code> &mdash; defines whether this element should be drawn
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">renderData</span>:*</code> (default = <code>null</code>)<code></code> &mdash; a unique object to be interpreted by your IFoamRenderer and associated with this element
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">solver</span>:<a href="dynamics/ode/IODESolver.html">IODESolver</a></code> (default = <code>null</code>)<code></code> &mdash; IODESolver to use to advance the state of this element
   
   </td>
</tr>
</table>
<p>
<span class="label">See also</span>
</p>
<div class="seeAlso">ISimulatable<br>RigidBody<br>IFoamRenderer<br>Renderable.data<br>IODESolver<br>
<a href="../foam/Foam.html#addRenderable" target="">addRenderable</a>
</div>
</div>
<a name="addGlobalForceGenerator()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">addGlobalForceGenerator</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function addGlobalForceGenerator(forceGenerator:<a href="dynamics/force/IForceGenerator.html">IForceGenerator</a>, applyToExisting:Boolean = true):void</code><p>
   Adds a global force to the simulation
   
   </p><p>
   This force will be added to all future and current (as defined 
   by applyToExisting) elements
   </p>
   
   <span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">forceGenerator</span>:<a href="dynamics/force/IForceGenerator.html">IForceGenerator</a></code> &mdash; IForceGenerator to add
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">applyToExisting</span>:Boolean</code> (default = <code>true</code>)<code></code> &mdash; whether to add this force generator to all 
   elements already added to FOAM
   
   </td>
</tr>
</table>
<p>
<span class="label">See also</span>
</p>
<div class="seeAlso">ISimulatable.addForceGenerator</div>
</div>
<a name="addRenderable()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">addRenderable</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function addRenderable(renderable:<a href="view/Renderable.html">Renderable</a>):void</code><p>
   Adds a renderable element to the renderer
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">renderable</span>:<a href="view/Renderable.html">Renderable</a></code> &mdash; Renderable to add
   
   </td>
</tr>
</table>
<p>
<span class="label">See also</span>
</p>
<div class="seeAlso">Renderable<br>IFoamRenderer</div>
</div>
<a name="removeElement()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">removeElement</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function removeElement(element:<a href="dynamics/element/ISimulatable.html">ISimulatable</a>):void</code><p>
   Removes an element from the simulation
   
   </p><p>
   This removes the element from the renderer and the engine.
   </p>
   
   <span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">element</span>:<a href="dynamics/element/ISimulatable.html">ISimulatable</a></code> &mdash; ISimulatable to remove
   
   </td>
</tr>
</table>
<p>
<span class="label">See also</span>
</p>
<div class="seeAlso">
<a href="../foam/Foam.html#stopDrawing" target="">stopDrawing</a>
<br>stopSimulating</div>
</div>
<a name="removeGlobalForceGenerator()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">removeGlobalForceGenerator</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function removeGlobalForceGenerator(forceGenerator:<a href="dynamics/force/IForceGenerator.html">IForceGenerator</a>, remainInEffect:Boolean = false):void</code><p>
   Removes a global force from the simulation
   
   </p><p>
   This force will be removed from all elements its currently generating
   for depending on remainInEffect
   </p>
   
   <span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">forceGenerator</span>:<a href="dynamics/force/IForceGenerator.html">IForceGenerator</a></code> &mdash; IForceGenerator to remove
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">remainInEffect</span>:Boolean</code> (default = <code>false</code>)<code></code> &mdash; whether to allow it to keep generating, but remove
   it from new additions to FOAM, or remove it from all affected ISimulatables
   
   </td>
</tr>
</table>
<p>
<span class="label">See also</span>
</p>
<div class="seeAlso">ISimulatable.addForceGenerator</div>
</div>
<a name="setCoarseCollisionDetector()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">setCoarseCollisionDetector</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function setCoarseCollisionDetector(detector:<a href="dynamics/collision/ICoarseCollisionDetector.html">ICoarseCollisionDetector</a>):void</code><p>
   Sets the engine's coarse collision detector
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">detector</span>:<a href="dynamics/collision/ICoarseCollisionDetector.html">ICoarseCollisionDetector</a></code> &mdash; ICoarseCollisionDetector to handle broad phase culling
   </td>
</tr>
</table>
</div>
<a name="setCollisionFactory()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">setCollisionFactory</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function setCollisionFactory(factory:<a href="dynamics/collision/ICollisionFactory.html">ICollisionFactory</a>):void</code><p>
   Defines the collision factory used by the coarse detector to return IFineCollisionDetectors
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">factory</span>:<a href="dynamics/collision/ICollisionFactory.html">ICollisionFactory</a></code> &mdash; CollisionFactory
   </td>
</tr>
</table>
</div>
<a name="setRenderer()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">setRenderer</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function setRenderer(renderer:<a href="view/IFoamRenderer.html">IFoamRenderer</a>):void</code><p>
   Sets the renderer
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">renderer</span>:<a href="view/IFoamRenderer.html">IFoamRenderer</a></code></td>
</tr>
</table>
<p>
<span class="label">See also</span>
</p>
<div class="seeAlso">IFoamRenderer</div>
</div>
<a name="simulate()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">simulate</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function simulate():void</code><p>
   Starts running the simulation
   
   </p><p>
<span class="label">See also</span>
</p>
<div class="seeAlso">IFoamRenderer.draw<br>
<a href="../foam/Foam.html#stepForward" target="">stepForward</a>
<br>
<a href="../foam/Foam.html#stop" target="">stop</a>
</div>
</div>
<a name="stepBackward()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">stepBackward</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function stepBackward(event:Event = null):void</code><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">event</span>:Event</code> (default = <code>null</code>)<code></code></td>
</tr>
</table>
</div>
<a name="stepForward()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">stepForward</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function stepForward(event:Event = null):void</code><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">event</span>:Event</code> (default = <code>null</code>)<code></code></td>
</tr>
</table>
</div>
<a name="stop()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">stop</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function stop():void</code><p>
   Stops the simulation
   
   </p><p>
<span class="label">See also</span>
</p>
<div class="seeAlso">
<a href="../foam/Foam.html#start" target="">start</a>
</div>
</div>
<a name="stopColliding()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">stopColliding</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function stopColliding(element:<a href="dynamics/element/ISimulatable.html">ISimulatable</a>):void</code><p>
   Removes an element from collision consideration
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">element</span>:<a href="dynamics/element/ISimulatable.html">ISimulatable</a></code> &mdash; element to remove
   
   </td>
</tr>
</table>
<p>
<span class="label">See also</span>
</p>
<div class="seeAlso">PhysicsEngine.removeCollidable</div>
</div>
<a name="stopDrawing()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">stopDrawing</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function stopDrawing(element:*):void</code><p>
   Stops an element from being rendered.
   
   </p><p>
   Note that this does not stop the element from simulation when 
   called by itself.
   </p>
   
   <span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">element</span>:*</code> &mdash; element to remove
   </td>
</tr>
</table>
</div>
<a name="stopSimulating()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">stopSimulating</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function stopSimulating(element:<a href="dynamics/element/ISimulatable.html">ISimulatable</a>):void</code><p>
   Stops an element from being simulated
   
   </p><p>
   Note that this does not stop an element from being rendered.
   It does, however remove it from collision consideration. Also,
   the simulation is stopped if there is nothing left to simulate.
   </p>
   
   <span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">element</span>:<a href="dynamics/element/ISimulatable.html">ISimulatable</a></code> &mdash; element to remove from simulation
   </td>
</tr>
</table>
</div>
<a name="useMouseDragger()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">useMouseDragger</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function useMouseDragger(value:Boolean):void</code><p>
   Depicts whether to use the MouseSpring on bodies or not
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">value</span>:Boolean</code> &mdash; true to use the dragger, false otherwise
   
   </td>
</tr>
</table>
</div>
<div class="detailSectionHeader">Event detail</div>
<a name="event:step"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">step</td><td class="detailHeaderType">event&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<span class="label">Event object type: </span><a href=""><code>flash.events.Event</code></a>
<br>
<p></p>
</div>
<a name="constantDetail"></a>
<div class="detailSectionHeader">Constant detail</div>
<a name="DEFAULT_ODE_SOLVER"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">DEFAULT_ODE_SOLVER</td><td class="detailHeaderType">constant</td>
</tr>
</table>
<div class="detailBody">
<code>public static const DEFAULT_ODE_SOLVER:Class</code><p> offers a default solver class for differential equations </p></div>
<a name="STEP"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">STEP</td><td class="detailHeaderType">constant</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static const STEP:String = "step"</code><p> step event </p></div>
<br>
<br>
<hr>
<br>
<p></p>
<center class="copyright"> 
</center>
</div>
</body>
</html>
<!-- -->
